Forcing magic_halt during mass-erase of kinetis devices.#7
Forcing magic_halt during mass-erase of kinetis devices.#7haata wants to merge 4 commits intomchck:masterfrom
Conversation
- If chip is already flashed, mass erase will not erase unless reset - Also works when unlocking a secured chip (just hold down reset when calling mass erase)
|
Thanks for your submission. I've been heavily restructuring the code (see the cmsis-dap branch). I'll try to add the same behavior to the new code. I believe that I have seen JLink adapters mass-erasing the target without me holding down reset, but they might have just used the reset line. |
|
Cool, looking forward to the re-factor. I had a lot of flashing issues with the mk20dx256vlh7 (had to put series resistors on the SWD CLK and IO lines to get it to work). Caused me to inadvertently secure the chip often. Ended up buying a jlink adapter to attempt to unlock. It requires the Reset pin attached to it. |
|
Good to know. I've been working on dedicated programming hardware (with SWD series resistors). Maybe I can get you interested in getting some for your next project :) |
|
Neat! I've been trying to standardize on the J-Link needle connector (TC2050-IDC) because it'll do both SWD and JTAG if I need it. Unfortunately Segger flashers are too expensive (I have one, but it's not reasonable to expect everyone to have one, or buying a bunch for the factory). For the bus pirate we just have an adapter to break out the SWD, GND and +5 V. At minimum I just need SWD (and ideally RESET line control) (Got 2000+ chips to flash for the Infinity ErgoDox) |
- Used to do ruby module checking
Will be used to select a specific bootloader to flash based on the MCU detected - Using --detect2file, read out registers to /tmp/detectlog.log * SIM_SOPT1 * SIM_SDID * SIM_FCFG1 * SCB_CPUID
Some background:
(It would be nice to actually control the reset line with the bus pirate, similar to a jlink flasher but I'm not familiar enough with ruby/bus pirate to do that right now)